#include <iostream>
#include <vector>
#include <string>
#include <unordered_set>

using namespace std;
class Solution
{
public:
    bool halvesAreAlike(string s)
    {
        unordered_set<char> ss{'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'};
        int l_num = 0, r_num = 0;
        int mid = s.size() / 2;
        int num = 0;
        for (auto ch : s)
        {
            if (ss.count(ch))
            {
                if (num < mid)
                    l_num++;
                else
                    r_num++;
            }
            ++num;
        }
        return l_num == r_num;
    }
};